
let infomation = [
  {
    name:'xin',
    age:12,
    location:'四川省广元市朝天区',
    school:'安徽建筑大学',
    major:'网络工程'
  }
]
export function data(state = infomation, action){
  switch (action.type) {
    case 'UPDATE':
      return state = [Object.assign(infomation[0], action.data)]
      break
    //定义修改的操作  
    default:
      return state
      break;
  }
}